import { IMTableType } from "@/types/table";
import { DrawerFormStateType } from "./type";
export const operateType = ref<string>("");
export const merchantList = ref<any[]>([]);
export const queryParams = reactive<any>({});
export const columns = reactive<IMTableType[]>([
  { title: getProxyT("base.index"), dataIndex: "index", key: "index" },
  { title: getProxyT("table65"), dataIndex: "username", key: "username" },
  { title: getProxyT("table66"), dataIndex: "name", key: "name" },
  {
    title: getProxyT("table67"),
    dataIndex: "servername",
    key: "servername",
  },
  {
    title: getProxyT("table14"),
    dataIndex: "merchant_user",
    key: "merchant_user",
  },
  { title: getProxyT("table31"), dataIndex: "status", key: "status" },
  {
    title: getProxyT("table209"),
    dataIndex: "registerCount",
    key: "registerCount",
  },
  {
    title: getProxyT("table43"),
    dataIndex: "created_at",
    key: "created_at",
    customRender: ({ text }: any) => getTimeByZone(text),
  },
  {
    title: getProxyT("table44"),
    dataIndex: "updated_at",
    key: "updated_at",
    customRender: ({ text }: any) => getTimeByZone(text),
  },
  {
    title: getProxyT("table23"),
    dataIndex: "admin_user",
    key: "admin_user",
  },
  { title: getProxyT("base.action"), key: "action" },
]);

export const tabIndex = ref(0);
export const tabPower = reactive([true, true]);
export const drawerFormState = reactive<DrawerFormStateType>({
  editId: void 0,
  username: void 0,
  name: void 0,
  remark: void 0,
  status: 0,
  merchant_uid: void 0,
  servername: void 0,
});
